<template>
  <el-table
    :data="tableData"
    style="width: 100%"
    :default-sort = "{prop: 'date', order: 'descending'}"
    >
    <el-table-column
      prop="date"
      label="日期"
      sortable>
    </el-table-column>
    <el-table-column
      prop="name"
      label="姓名"
      sortable>
    </el-table-column>
    <el-table-column
      prop="temperature"
      label="体温"
      sortable>
    </el-table-column>
    <el-table-column
      prop="phonenumber"
      label="联系方式">
    </el-table-column>
    <el-table-column
      fixed="right"
      label="操作"
      width="100">
      <template slot-scope="scope">
        <el-button @click="handleClick(scope.row)" type="text" size="small">详细信息</el-button>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: 'TemperatureList',
  methods: {
    handleClick (row) {
      this.$router.push({
        path: '/admin/unpostInfo',
        query: {
          unpostInfoId: row.userid
        }
      })
    }

  },
  mounted: function () {
    console.log(this.$parent)
  },
  props: ['tableData']
}
</script>
